<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="./swiper-4.4.2/dist/css/swiper.css">
  <link rel="stylesheet" href="./animate.min.css">
  <style>
    body {
      margin: 0;
    }

    html, body {
      height: 100%;
    }

    .swiper-container {
      height: 100%;
    }

    .swiper-slide {
      background: #000;
    }

    img {
      position: absolute;
    }

    img:nth-child(1) {
      top: 15%;
      left: 10px;
    }
    img:nth-child(2) {
      top: 30%;
      right: 10px;
    }
    p {
      margin: 0;
      color: #fff;
      font-size: 14px;
      margin-bottom: 5px;
      text-align: center;
    }
    p:nth-of-type(1) {
      margin-top: 88%;
    }

    .demo {
      animation-name: demo;
    }

    @keyframes demo {
      0% {
        transform: rotate(0deg);
        opacity: 0;
      }
      100% {
        transform: rotate(360deg);
        opacity: 1;
      }
    }

  </style>
</head>
<body>
  <div class="swiper-container">
    <div class="swiper-wrapper">
      <div class="swiper-slide">
        <img class="ani" swiper-animate-delay="" swiper-animate-duration="1s" swiper-animate-effect="demo" src="./img/1.webp" alt="">
        <img class="ani" swiper-animate-delay="1s" swiper-animate-duration="1s" swiper-animate-effect="bounceInRight" src="./img/2.webp" alt="">
        <p class="ani" swiper-animate-delay="2s" swiper-animate-duration="1s" swiper-animate-effect="bounceInDown">文字文字文字文字文字文字文字文字文字文字文</p>
        <p class="ani" swiper-animate-delay="3s" swiper-animate-duration="1s" swiper-animate-effect="bounceInUp">文字文字文字文字文字文字文字文字文字文字</p>

      </div>
      <div class="swiper-slide"><img class="ani" swiper-animate-delay="" swiper-animate-duration="1s" swiper-animate-effect="demo" src="./img/1.webp" alt="">
        <img class="ani" swiper-animate-delay="1s" swiper-animate-duration="1s" swiper-animate-effect="bounceInRight" src="./img/2.webp" alt="">
        <p class="ani" swiper-animate-delay="2s" swiper-animate-duration="1s" swiper-animate-effect="bounceInDown">文字文字文字文字文字文字文字文字文字文字文</p>
        <p class="ani" swiper-animate-delay="3s" swiper-animate-duration="1s" swiper-animate-effect="bounceInUp">文字文字文字文字文字文字文字文字文字文字</p></div>
      <div class="swiper-slide"><img class="ani" swiper-animate-delay="" swiper-animate-duration="1s" swiper-animate-effect="demo" src="./img/1.webp" alt="">
        <img class="ani" swiper-animate-delay="1s" swiper-animate-duration="1s" swiper-animate-effect="bounceInRight" src="./img/2.webp" alt="">
        <p class="ani" swiper-animate-delay="2s" swiper-animate-duration="1s" swiper-animate-effect="bounceInDown">文字文字文字文字文字文字文字文字文字文字文</p>
        <p class="ani" swiper-animate-delay="3s" swiper-animate-duration="1s" swiper-animate-effect="bounceInUp">文字文字文字文字文字文字文字文字文字文字</p></div>
    </div>
  </div>
  <script src="./swiper-4.4.2/dist/js/swiper.js"></script>
  <script src="./swiper.animate1.0.3.min.js"></script>
  <script>
    new Swiper('.swiper-container', {
      direction: 'vertical',
      on: {
        init: function () {
          swiperAnimateCache(this); //隐藏动画元素 
          swiperAnimate(this); //初始化完成开始动画
        },
        slideChangeTransitionEnd: function(){  // slide动画结束时
          swiperAnimate(this); //每个slide切换结束时也运行当前slide动画
          // this.slides.eq(this.activeIndex).find('.ani').removeClass('ani');
        } 
      }
    })
  
  </script>
</body>
</html>